package br.pro.raphael.airlinerecovery.servlet;


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.List;

import javax.jdo.PersistenceManager;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import  javax.jdo.Query;

import br.pro.raphael.air.Airline;
import br.pro.raphael.air.Flight;
import br.pro.raphael.util.PMF;

@SuppressWarnings("serial")
public class CargaCompania extends HttpServlet{	
	
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
		resp.setContentType("text/plain");
		        	
        	Airline empresa = new Airline("TRIP");
        	
        	
		
        	PersistenceManager pm = PMF.get().getPersistenceManager();
        	
        	 
        	pm.makePersistent(empresa);
        	
        	pm.close();
        	
        
       		resp.getWriter().println("Carga Completa");
		
	}

}
